Skip to main content

Meta Transfer

Create a meta-transaction message payload to transfer voucher balances.

Request URL

https://testnet.api.euclidprotocol.com/api/v1/execute/meta-txn/transfer

Example

curl -X 'POST'   'https://testnet.api.euclidprotocol.com/api/v1/execute/meta-txn/transfer'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '{
  "amount": "1000000",
  "from": {
    "address": "0x887e4aac216674d2c432798f851c1ea5d505b2e1",
    "chain_uid": "monad"
  },
  "recipient_address": {
    "address": "0x5abfe1234567890cdefabc1234567890defabc01",
    "chain_uid": "0g"
  },
  "sender": {
    "address": "0x887e4aac216674d2c432798f851c1ea5d505b2e1",
    "chain_uid": "monad"
  },
  "timeout": "60",
  "token": "euclid"
}'
{
  "msg": {
    "target": "euclid1yvgh8xeju5dyr0zxlkvq09htvhjj20fncp5g58np4u25g8rkpgjsy5hngy",
    "call_data": "{"transfer_voucher":{...}}"
  },
  "type": "transfer_voucher",
  "token_in": "",
  "token_out": "",
  "token": "euclid",
  "amount_in": "1000000",
  "amount_out": ""
}

Parameters

FieldTypeDescription
amountstringAmount of voucher tokens to transfer.
tokenstringVoucher token identifier.
fromCrossChainUserWithAmountSource user and chain for the voucher balance.
senderCrossChainUserWithAmountAddress and chain initiating the meta transaction.
recipient_addressCrossChainUserWithAmountRecipient user and chain for this transfer request.
msgstringOptional message payload to include with the transfer.
timeoutstringOptional timeout in seconds.

Response Fields

FieldTypeDescription
msg.targetstringRouter contract address that will receive the message.
msg.call_datastringEncoded contract call data.
typestringTransaction type (transfer_voucher).
tokenstringToken identifier for this meta message.
amount_instringInput amount tracked for this meta message.